package com.usian.feign;

import com.usian.fallback.UserFeignFallback;
import com.usian.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "nacos-provider",fallbackFactory = UserFeignFallback.class)
public interface UserFeign {

    @GetMapping("getUserById/{id}")
    User getUserById(@PathVariable Integer id);

    @RequestMapping("addUser")
    int addUser(@RequestBody User user);

    @RequestMapping("delUser")
    int delUser(@RequestParam Integer id);

}
